﻿using iWare.Wms.Core;
using iWare.Wms.Core.Service;
using System.ComponentModel.DataAnnotations;

namespace iWare.Wms.Application
{    
    
    /// <summary>
    /// 物料信息查询参数
    /// </summary>
    public class WmsMaterialSearch : PageInputBase
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public virtual string Materialname { get; set; }
        
        /// <summary>
        /// 物料编号
        /// </summary>
        public virtual string Materialno { get; set; }
        
        /// <summary>
        /// 物料批次
        /// </summary>
        public virtual string Materialbatch { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        public virtual string Description { get; set; }
        
        /// <summary>
        /// 检验方式
        /// </summary>
        public virtual iWare.Wms.Core.Enum.MaterialInspection? Inspectionmethod { get; set; }
        
        /// <summary>
        /// 物料类别
        /// </summary>
        public virtual iWare.Wms.Core.Enum.MaterialType? Materialtype { get; set; }
        
        /// <summary>
        /// 物料规格
        /// </summary>
        public virtual string Materialspec { get; set; }
        
        /// <summary>
        /// 单位类别
        /// </summary>
        public virtual iWare.Wms.Core.Enum.UnitType? Unittype { get; set; }
        
        /// <summary>
        /// 单位编号
        /// </summary>
        public virtual iWare.Wms.Core.Enum.UnitnoType? Unitno { get; set; }
        
        /// <summary>
        /// 安全存量
        /// </summary>
        public virtual decimal? Safeqty { get; set; }
        
        /// <summary>
        /// 是否关键物料
        /// </summary>
        public virtual iWare.Wms.Core.YesOrNot? Keymaterials { get; set; }
        
        /// <summary>
        /// Erp单号
        /// </summary>
        public virtual string Erpno { get; set; }
        
        /// <summary>
        /// 图号
        /// </summary>
        public virtual string Graphno { get; set; }
        
        /// <summary>
        /// 品管类别
        /// </summary>
        public virtual string Qccategory { get; set; }
        
        /// <summary>
        /// 保质期
        /// </summary>
        public virtual float Warranty { get; set; }
        
        /// <summary>
        /// 最大存量
        /// </summary>
        public virtual decimal? Maximumqty { get; set; }
        
        /// <summary>
        /// 最小库龄
        /// </summary>
        public virtual float Minstorageage { get; set; }
        
        /// <summary>
        /// 最大库龄
        /// </summary>
        public virtual float Maxstorageage { get; set; }
        
        /// <summary>
        /// 用户自定义字段02
        /// </summary>
        public virtual string UserDefined01 { get; set; }
        
        /// <summary>
        /// 用户自定义字段02
        /// </summary>
        public virtual string UserDefined02 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual float UserDefined03 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual float UserDefined04 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual decimal? UserDefined05 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual decimal? UserDefined06 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual DateTimeOffset? UserDefined07 { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public virtual DateTimeOffset? UserDefined08 { get; set; }
        
    }

    /// <summary>
    /// 物料信息输入参数
    /// </summary>
    public class WmsMaterialInput: BaseId
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public virtual string Materialname { get; set; }
        
        /// <summary>
        /// 物料编号
        /// </summary>
        public virtual string Materialno { get; set; }
        
        /// <summary>
        /// 物料批次
        /// </summary>
        public virtual string Materialbatch { get; set; }
        
        /// <summary>
        /// 描述
        /// </summary>
        public virtual string Description { get; set; }
        
        /// <summary>
        /// 检验方式
        /// </summary>
        public virtual iWare.Wms.Core.Enum.MaterialInspection Inspectionmethod { get; set; }
        
        /// <summary>
        /// 物料类别
        /// </summary>
        public virtual iWare.Wms.Core.Enum.MaterialType Materialtype { get; set; }
        
        /// <summary>
        /// 物料规格
        /// </summary>
        public virtual string Materialspec { get; set; }
        
        /// <summary>
        /// 单位类别
        /// </summary>
        public virtual iWare.Wms.Core.Enum.UnitType Unittype { get; set; }
        
        /// <summary>
        /// 单位编号
        /// </summary>
        public virtual iWare.Wms.Core.Enum.UnitnoType Unitno { get; set; }
        
        /// <summary>
        /// 安全存量
        /// </summary>
        public virtual decimal Safeqty { get; set; }
        
        /// <summary>
        /// 是否关键物料
        /// </summary>
        public virtual iWare.Wms.Core.YesOrNot Keymaterials { get; set; }
        
        /// <summary>
        /// Erp单号
        /// </summary>
        public virtual string Erpno { get; set; }
        
        /// <summary>
        /// 图号
        /// </summary>
        public virtual string Graphno { get; set; }
        
        /// <summary>
        /// 品管类别
        /// </summary>
        public virtual string Qccategory { get; set; }
        
        /// <summary>
        /// 保质期
        /// </summary>
        public virtual float Warranty { get; set; }
        
        /// <summary>
        /// 最大存量
        /// </summary>
        public virtual decimal Maximumqty { get; set; }
        
        /// <summary>
        /// 最小库龄
        /// </summary>
        public virtual float Minstorageage { get; set; }
        
        /// <summary>
        /// 最大库龄
        /// </summary>
        public virtual float Maxstorageage { get; set; }

        /// <summary>
        /// 组盘数量
        /// </summary>
        public decimal Bindquantity { get; set; }
    }

    public class AddWmsMaterialInput : WmsMaterialInput
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        [Required(ErrorMessage = "物料名称不能为空")]
        public override string Materialname { get; set; }
        
        /// <summary>
        /// 物料编号
        /// </summary>
        [Required(ErrorMessage = "物料编号不能为空")]
        public override string Materialno { get; set; }
        
        /// <summary>
        /// 物料批次
        /// </summary>
        [Required(ErrorMessage = "物料批次不能为空")]
        public override string Materialbatch { get; set; }
        
    }

    public class DeleteWmsMaterialInput : BaseId
    {
    }

    public class UpdateWmsMaterialInput : WmsMaterialInput
    {
        /// <summary>
        /// Id主键
        /// </summary>
        [Required(ErrorMessage = "Id主键不能为空")]
        public long Id { get; set; }
        
    }

    public class QueryeWmsMaterialInput : BaseId
    {

    }
}
